<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function func(){
            let web="func..web";
            function run(){
                let web="run..web";//私有的属性
                console.log(web);
            }
            run();
            console.log(web);
        }
        func();

        //全局污染
    //     function webfunc(){
    //         name="唐玮";//相当于全局变量,所以一定不要忘记定义var let const
    //     }
    //     webfunc();
    //     console.log(name);
       
     </script>
</body>
</html>